import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { buildApiUrlSync } from './config/index.js'

const app = createApp(App)

app.use(router)

// 将router实例挂载到window对象，供访问统计服务使用
window.router = router

// 初始化错误上报器
if (typeof window.ErrorReporter !== 'undefined') {
  window.ErrorReporter.config({
    apiBaseUrl: buildApiUrlSync(''),
    debug: false, // 生产环境关闭调试模式
  });
}

app.mount('#app') 